<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../CSS/default.css" rel="stylesheet" type="text/css" />
<title>Badge Creation Report</title>
<style type="text/css" media="print">
page {
  size:landscape;
}
</style>

</head>

<cfinclude template="../functions.cfm">
<cfinclude template="../authentication.cfm">

<cfif Session.bolAuth EQ True and (Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR)>   
    <cfquery name="qryGetStep4Waiting" datasource="EPAR">
    	scf_GetWaiting 5,0
    </cfquery>
        
    <body onload="window.print();">
    <!-- start header -->
    <cfinclude template="header.cfm"/>
    <!-- end header -->

            <div class="post">
                <div class="entry">
                	<div clase="report">
                		<h1 class="title">Badge Creation Report</h1>
	<cfoutput>	
        <cfset intX = 1>
        <cfset GAP = 25>
        <cfif qryGetStep4Waiting.recordcount GT 0>
            <table width = 100%>
                <tr>
                    <td>&nbsp;</td> 
                </tr>
                <tr>
                    <td width =15%>&nbsp;</td> 
                    <td valign="bottom"><u>##</u></td> 
                    <td width=#GAP#>&nbsp;</td> 
                    <td valign="bottom">
                        <strong><u>Name</u></strong>
                    </td>
                    <td width=#GAP#>&nbsp;</td> 
                    <td valign="bottom">
                        <strong><u>Job Title</u></strong>
                    </td>
                    <td width=#GAP#>&nbsp;</td> 
                    <td valign="bottom">
                        <strong><u>Department</u></strong>
                    </td>
                    <td width =15%>&nbsp;</td> 
                </tr>
                <cfloop query="qryGetStep4Waiting">     
                    <cfset intStepID = ID>                             
                    <cfset strEmpName =  Name>                   	
                    <cfquery name="qryGetEmpInfo" datasource="EPAR">
                        scf_GetEmpInfoByStep #intStepID#
                    </cfquery>
                    <cfset intEmpID = qryGetEmpInfo.ID>
                    <cfset strBadgePos = qryGetEmpInfo.BadgePos>                              
                                                   
                    <cfquery name="qryGetDept" datasource="WFCDB">
                        Select OrganizationDescription + ' (' + OrganizationCode + ')' as Org, OrganizationDescription
                        From tOrganizations
                        Where OrgCodeIDNo = #qryGetEmpInfo.DeptID#	
                    </cfquery> 
                    <cfset strDept = qryGetDept.OrganizationDescription>
                <tr>
                    <td>&nbsp;</td> 
                    <td>#intX#)</td> 
                    <td>&nbsp;</td> 
                    <td valign="bottom">
                        #strEmpName#
                    </td>
                    <td>&nbsp;</td> 
                    <td valign="bottom">
                        #strBadgePos#
                    </td>
                    <td>&nbsp;</td> 
                    <td valign="bottom">
                        #strDept#
                    </td> 
                </tr>
                <tr>
                    <td>&nbsp;</td> 
                </tr>
                    <cfset intX += 1>
                </cfloop>   
                
            </table>
        <cfelse>
            <span class="error">At the present time, there are not any employees staged for entry to IVIS.</span>
        </cfif>
        
    </cfoutput>
    
    			</div>
    		</div>
    	</div>
    
	</body>
    
<cfelse>
	<cfinclude template="../Denied.cfm">
    
</cfif>
</html>
